<?php
pdo_query("DROP TABLE IF EXISTS `ims_slj123_pc_content`;
CREATE TABLE IF NOT EXISTS `ims_slj123_pc_content` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`weid` int(10) NOT NULL,
`from_place` varchar(255) NOT NULL,
`to_place` varchar(255) NOT NULL,
`user_id` int(11) NOT NULL,
`type` int(11) NOT NULL COMMENT '类型 1:人找车 2:车找人',
`start_time` int(11) NOT NULL,
`mid_place` varchar(255) NOT NULL,
`car` varchar(255) NOT NULL,
`user_count` varchar(255) NOT NULL,
`note` varchar(255) NOT NULL,
`top_time` int(11) NOT NULL,
`postdate` int(11) NOT NULL,
`name` varchar(255) NOT NULL,
`phone` varchar(255) NOT NULL,
`sex` int(11) NOT NULL,
`head` varchar(255) NOT NULL,
`istop` tinyint(2) NOT NULL DEFAULT '0' COMMENT '0为不置顶，1为置顶',
`order_id` int(11) NOT NULL,
`status` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `ims_slj123_pc_index`;
CREATE TABLE IF NOT EXISTS `ims_slj123_pc_index` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`weid` int(10) NOT NULL,
`from_place` varchar(255) NOT NULL,
`mid_place` varchar(255) NOT NULL,
`to_place` varchar(255) NOT NULL,
`user_id` int(11) NOT NULL DEFAULT '0',
`type` int(11) NOT NULL DEFAULT '0' COMMENT '类型 1:人找车 2:车找人',
`postdate` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ,
`top_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ,
`start_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`valid_thru` datetime NOT NULL DEFAULT '1970-01-01 00:00:00',
`car` varchar(255) NOT NULL,
`user_count` varchar(255) NOT NULL,
`cost` decimal(12,2) unsigned NOT NULL DEFAULT '0.00',
`note` varchar(255) NOT NULL,
`name` varchar(255) NOT NULL,
`phone` varchar(255) NOT NULL,
`sex` int(11) NOT NULL DEFAULT '1',
`head` varchar(255) NOT NULL,
`status` int(11) NOT NULL DEFAULT '0',
`order_id` int(11) NOT NULL DEFAULT '0',
`from_longitude` decimal(18,10) NOT NULL DEFAULT '0.0000000000',
`from_latitude` decimal(18,10) NOT NULL DEFAULT '0.0000000000',
`to_latitude` decimal(18,10) NOT NULL DEFAULT '0.0000000000',
`to_longitude` decimal(18,10) NOT NULL DEFAULT '0.0000000000',
`view_count` int(10) unsigned NOT NULL DEFAULT '0',
`verified` tinyint(1) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `ims_slj123_pc_order`;
CREATE TABLE IF NOT EXISTS `ims_slj123_pc_order` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`weid` int(10) NOT NULL,
`title` varchar(255) DEFAULT NULL,
`money` decimal(11,2) DEFAULT NULL,
`status` int(11) DEFAULT NULL COMMENT '0 未支付 1已支付',
`user_id` int(11) DEFAULT NULL,
`extra` varchar(255) DEFAULT NULL,
`create_time` int(11) unsigned DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `ims_slj123_pc_setting`;
CREATE TABLE IF NOT EXISTS `ims_slj123_pc_setting` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`weid` int(10) NOT NULL,
`people_post_cost` decimal(11,2) DEFAULT NULL DEFAULT '0.00' COMMENT '发布找人时金额',
`car_post_cost` decimal(11,2) DEFAULT NULL DEFAULT '0.00' COMMENT '发布找车时金额',
`car_post_cost1` decimal(11,2) DEFAULT NULL DEFAULT '0.00',
`car_post_cost2` decimal(11,2) DEFAULT NULL DEFAULT '0.00',
`top_time_cost` decimal(11,2) DEFAULT NULL DEFAULT '0.00' COMMENT '置顶每小时金额',
`banner` varchar(255) DEFAULT NULL COMMENT '首页广告位',
`notice_content` text DEFAULT NULL COMMENT '公告内容',
`notice_title` varchar(255) DEFAULT NULL COMMENT '公告标题',
`share_pic` varchar(255) DEFAULT NULL COMMENT '分享图片',
`share_title` varchar(255) DEFAULT NULL COMMENT '分享标题',
`share_des` varchar(255) NOT NULL,
`banner_link` text NOT NULL,
`notice` text NOT NULL,
`isopen_renzheng` int(10) NOT NULL,
`unitid` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `ims_slj123_pc_sms_code`;
CREATE TABLE IF NOT EXISTS `ims_slj123_pc_sms_code` (
`openid` varchar(50) NOT NULL,
`code` varchar(10) NOT NULL,
`timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ,
PRIMARY KEY (`code`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `ims_slj123_pc_user`;
CREATE TABLE IF NOT EXISTS `ims_slj123_pc_user` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`weid` int(10) NOT NULL,
`uid` int(10) NOT NULL,
`wx_open_id` varchar(255) DEFAULT NULL,
`wx_id` varchar(64) NOT NULL,
`nickname` varchar(64) NOT NULL,
`name` varchar(255) DEFAULT NULL,
`tel` varchar(20) NOT NULL,
`sex` varchar(255) DEFAULT NULL,
`address` varchar(10) NOT NULL,
`head` varchar(255) DEFAULT NULL,
`mag_open_id` varchar(255) DEFAULT NULL,
`phone` varchar(255) DEFAULT NULL,
`gender` tinyint(1) unsigned NOT NULL DEFAULT '0',
`identity` varchar(20) NOT NULL,
`realname` varchar(10) NOT NULL,
`area` varchar(30) NOT NULL,
`initial_driving_license_date` date NOT NULL DEFAULT '1970-01-01',
`car_number` varchar(10) NOT NULL,
`car_model` varchar(10) NOT NULL,
`car_color` varchar(10) NOT NULL,
`car_owner` varchar(10) NOT NULL,
`car_register_date` date NOT NULL DEFAULT '1970-01-01',
`driving_license` varchar(255) NOT NULL,
`driving_permit` varchar(255) NOT NULL,
`identity_front` varchar(255) NOT NULL,
`identity_back` varchar(255) NOT NULL,
`verified` tinyint(1) unsigned NOT NULL DEFAULT '0',
`update_time` datetime NOT NULL DEFAULT '1970-01-01 00:00:00',
PRIMARY KEY (`id`),
UNIQUE KEY `ims_slj123_pc_user_uid` (`uid`),
UNIQUE KEY `ims_slj123_pc_user_openid` (`wx_open_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

");
